/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.applicatioN.entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Slim
 */
@Embeddable
public class MaitriserLPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "IDENTIFIANT")
    private int identifiant;
    @Basic(optional = false)
    @Column(name = "INTITULE")
    private String intitule;

    public MaitriserLPK() {
    }

    public MaitriserLPK(int identifiant, String intitule) {
        this.identifiant = identifiant;
        this.intitule = intitule;
    }

    public int getIdentifiant() {
        return identifiant;
    }

    public void setIdentifiant(int identifiant) {
        this.identifiant = identifiant;
    }

    public String getIntitule() {
        return intitule;
    }

    public void setIntitule(String intitule) {
        this.intitule = intitule;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) identifiant;
        hash += (intitule != null ? intitule.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof MaitriserLPK)) {
            return false;
        }
        MaitriserLPK other = (MaitriserLPK) object;
        if (this.identifiant != other.identifiant) {
            return false;
        }
        if ((this.intitule == null && other.intitule != null) || (this.intitule != null && !this.intitule.equals(other.intitule))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.applicatioN.entities.MaitriserLPK[ identifiant=" + identifiant + ", intitule=" + intitule + " ]";
    }
    
}
